package net.vtstar.vtcloud.framework.system.api.util;

import java.net.InetAddress;
import java.util.function.Predicate;

/**
 * com.linecorp.armeria.common.DefaultFlagsProvider
 */
public final class DefaultFlagsProvider implements FlagsProvider {

    @Override
    public int priority() {
        return Integer.MIN_VALUE;
    }

    @Override
    public String name() {
        return "default";
    }

    @Override
    public Predicate<InetAddress> preferredIpV4Addresses() {
        return new Predicate<>() {
            @Override
            public boolean test(InetAddress ignored) {
                return true;
            }

            @Override
            public String toString() {
                return "*";
            }
        };
    }
    
}
